const Router = require('koa-router')
const app = new Router({ prefix: "/hose" })
const { islogin } = require('../../zjj/hose.js')
const { hoseadd, hoseaddress, hoseseach, hoseid, userlove, allloves, leavelove, sethistroy, allhistory, delehistroy, myselfhose, okhose, hosedown, hoseup } = require('../../controllers/hose')
app.post('/add', islogin, hoseadd)
app.post('/address', islogin, hoseaddress)
app.get('/seach', islogin, hoseseach)
app.get("/:id", islogin, hoseid)
app.get("/love/:id", islogin, userlove)
app.get("/leavelove/:hoseid/:userid", islogin, leavelove)
app.post("/allloves", islogin, allloves)
app.get('/histroy/:hoseid', islogin, sethistroy)
app.get('/delehistroy/:id', islogin, delehistroy)
app.post('/allhistory/:limit/:offset', islogin, allhistory)
app.post('/myselfhose', islogin, myselfhose)
app.post('/okhose/:hoseid', islogin, okhose)
app.post('/hosedown/:hoseid', islogin, hosedown)
app.post('/hoseup/:hoseid', islogin, hoseup)
module.exports = app